const path = require('path');
const express = require('express');
const logger = require('morgan');

const userRouter = require('./routes/user');
const studentRouter = require('./routes/student');

const port = 3000;
const app = express();

app.use(logger('dev'));
app.use(express.text());
app.use(express.json());
app.use(express.urlencoded({extended: false}));
app.use(express.static( path.resolve(__dirname,'public') ));

app.use(userRouter);
app.use(studentRouter);

app.listen(port);